export default{
    loginMock:(options)=>{
        console.log(JSON.parse(options.body )  );
        let {username,password}=JSON.parse(options.body )
     
        if(username=='admin' && password=='123456'){
            return{
                code:200,
                msg:'成功咯',
                data:{
                    token:'token-admin-123456789',
                    role:'钢铁侠'
                }
            }
        }else if(username=='user' && password=='123456'){
            return{
                code:200,
                msg:'成功咯',
                data:{
                    token:'token-user-123456789',
                    role:'朋友'
                }
            }
        }else{
            return{
                code:500,
                msg:'账号不存在',
                data:null
                   
                
            }
        }
    }
}